/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package FileSystem;

import java.util.Comparator;



/**
 *
 * @author asfeor
 */
public class typeCompaer{

String fileName, fileSize, fileLastModification;
public static final  Comparator<typeCompaer> Sort_by_name_ASC=new Comparator<typeCompaer>() {

        @Override
        public int compare(typeCompaer o1, typeCompaer o2) {
        return    o1.getName().compareTo(o2.getName());
        }
    };
public static final Comparator<typeCompaer> Sort_by_name_DESC=new Comparator<typeCompaer>() {

        @Override
        public int compare(typeCompaer o1, typeCompaer o2) {
        return    -1*o1.getName().compareTo(o2.getName());    
        }
    };
public static final Comparator<typeCompaer> Sort_by_Size_ASC=new Comparator<typeCompaer>() {

        @Override
        public int compare(typeCompaer o1, typeCompaer o2) {
            return o1.getLength().compareTo(o2.getLength());
        }
    };
public static final Comparator<typeCompaer> Sort_by_Size_DESC=new Comparator<typeCompaer>() {

        @Override
        public int compare(typeCompaer o1, typeCompaer o2) {
            return -1*o1.getLength().compareTo(o2.getLength());
        }
    };
public static final Comparator<typeCompaer> Sort_by_Last_Modification_ASC=new Comparator<typeCompaer>() {

        @Override
        public int compare(typeCompaer o1, typeCompaer o2) {
            return o1.getDate().compareTo(o2.getDate());
        }
    };
public static final Comparator<typeCompaer> Sort_by_Last_Modification_DESC=new Comparator<typeCompaer>() {

        @Override
        public int compare(typeCompaer o1, typeCompaer o2) {
            return -1*o1.getDate().compareTo(o2.getDate());
        }
    };
public typeCompaer(){
    
}
public typeCompaer(String FileName,String FileSize, String FileLastModification){
   fileName=FileName;
   fileSize=FileSize;
   fileLastModification=FileLastModification;
}
    private String getName() {
        return fileName;
    }

    private String getLength() {
        return fileSize;
    }

    private String getDate() {
        return fileLastModification;
    }

}
